package com.Servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/message")
public class MessageServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //调用DAO层,根据传递的邮件名,查询制指定的邮件
        String emailMsg = "hello world";
        req.setAttribute("emailMsg",emailMsg);
        req.getRequestDispatcher("/WEB-INF/emailMsg.jsp").forward(req,resp);
    }
}
